'use strict'

import HybridJS from '../core/core'

const $ = HybridJS

/**
 * 新开webview页面, 参数： { url:"",animated:true/false,hideTab:true }
 */
function push (obj) {
    return $.callNativeSync("nav","push",obj)
}

/**
 * 关闭当前页面，跳转到新页面
 */
function to(obj) {
    return $.callNativeSync("nav","to",obj)
}

function back() {
    return $.callNativeSync("nav","back")
}

export default {
    push,
    to,
    back
}